<script setup>
import { ref, computed } from "vue"

const surname = ref('')
const name = ref('')

const fullName = computed(() => {
    return surname.value + name.value
})

</script>

<template>
    <input v-model="surname" placeholder="姓" />
    <input v-model="name" placeholder="名" />
    <p>全名：{{ fullName }}</p>
</template>